﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
namespace Betty
{
    public static class SoundManager
    {
        private static SoundEffect explosion;
        private static SoundEffect shot;
        private static SoundEffect gameOver;
        public static void Initialize(ContentManager content)
        {
            try
            {
                shot = content.Load<SoundEffect>(@"Sounds\Shot1");
                explosion = content.Load<SoundEffect>(@"Sounds\Explosion4");
                gameOver = content.Load<SoundEffect>(@"Sounds\game-over");
            }catch
            {
                Debug.Write("SoundManager Initialization Failed");
            }
        }

        public static void PlayExplosion()
        {
            try
            {
                explosion.Play();
            }catch
            {
                Debug.Write("PlayExplosion Failed");
            }
        }
        public static void PlayShot()
        {
            try
            {
                shot.Play();
            }catch
            {
                Debug.Write("PlayShot Failed");
            }
        }
        public static void PlayGameOver()
        {
            try
            {
                gameOver.Play();
            }
            catch
            {
                Debug.Write("PlayGameOver Failed");
            }
        }
    }

}
